print("欢迎使用用户检测系统")
list1 = [('root', '123456'), ('admin', 'admin')]
print("运行程序前输入quit退出，其他则继续,运行后只需要用户名输入quit即可退")
a = input("请输入你的选择：")
while a != "quit":
    username = input("请输入用户名：")
    userpasswd = input("请输入用户密码：")
    if (username == list1[0][0] and userpasswd == list1[0][1]) or (username == list1[1][0] and userpasswd == list1[1][1]):
        print("验证成功")
    elif (username == list1[0][0] and userpasswd != list1[0][1]) or (username == list1[1][0] and userpasswd != list1[1][1]):
        print("用户名存在，密码错误，验证失败，请重新验证")
    elif (username != list1[0][0] or username != list1[1][0]) and username != "quit":
        print("用户名不存在，验证失败，请重新验证")
    elif username == "quit":
        break
    else:
        break

